if (!action->private_data->label_set && action->private_data->stock_id)
{
GtkStockItem stock_item;
-
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (gtk_stock_lookup (action->private_data->stock_id, &stock_item))
action->private_data->label = g_strdup (stock_item.label);
+
+ G_GNUC_END_IGNORE_DEPRECATIONS;
}
g_object_notify (G_OBJECT (action), "label");
if (!action->private_data->label_set)
{
GtkStockItem stock_item;
-
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (action->private_data->stock_id &&
gtk_stock_lookup (action->private_data->stock_id, &stock_item))
gtk_action_set_label (action, stock_item.label);
- else
+ else
gtk_action_set_label (action, NULL);
-
+
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
action->private_data->label_set = FALSE;
}
}
g_object_get (action, "stock-id", &stock_id, NULL);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (stock_id && gtk_stock_lookup (stock_id, &stock_item))
{
accel_key = stock_item.keyval;
accel_mods = stock_item.modifier;
}
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
g_free (stock_id);
}
button = gtk_button_new_with_label (button_text);
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (button_text)
{
GtkStockItem item;
g_object_set (button, "use-stock", TRUE, NULL);
}
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
gtk_widget_set_can_default (button, TRUE);
gtk_widget_set_valign (button, GTK_ALIGN_BASELINE);
priv = image_menu_item->priv;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (priv->use_stock && priv->label && gtk_stock_lookup (priv->label, &stock_item))
if (stock_item.keyval)
{
g_object_notify (G_OBJECT (image_menu_item), "accel-group");
}
+
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
}
/**
button = gtk_button_new_with_label (button_text);
gtk_button_set_use_underline (GTK_BUTTON (button), TRUE);
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (button_text)
{
GtkStockItem item;
g_object_set (button, "use-stock", TRUE, NULL);
}
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
gtk_widget_set_can_default (button, TRUE);
gtk_widget_show (button);
#include "config.h"
+#define GDK_DISABLE_DEPRECATION_WARNINGS
+
#include <string.h>
#include "gtkprivate.h"
* any pointer into @items and @items can be freed. Use
* gtk_stock_add_static() if @items is persistent and GTK+ need not
* copy the array.
- *
+ *
+ * Deprecated: 3.10
**/
void
gtk_stock_add (const GtkStockItem *items,
*
* Same as gtk_stock_add(), but doesn't copy @items, so
* @items must persist until application exit.
- *
+ *
+ * Deprecated: 3.10
**/
void
gtk_stock_add_static (const GtkStockItem *items,
* gtk_stock_lookup:
* @stock_id: a stock item name
* @item: (out): stock item to initialize with values
- *
+ *
* Fills @item with the registered values for @stock_id, returning %TRUE
* if @stock_id was known.
- *
- *
+ *
* Return value: %TRUE if @item was initialized
+ *
+ * Deprecated: 3.10
**/
gboolean
gtk_stock_lookup (const gchar *stock_id,
* and each string in the list must be freed with g_free().
*
* Return value: (element-type utf8) (transfer full): a list of known stock IDs
+ *
+ * Deprecated: 3.10
**/
GSList*
gtk_stock_list_ids (void)
* Copies a stock item, mostly useful for language bindings and not in applications.
*
* Return value: a new #GtkStockItem
+ *
+ * Deprecated: 3.10
**/
GtkStockItem *
gtk_stock_item_copy (const GtkStockItem *item)
* Frees a stock item allocated on the heap, such as one returned by
* gtk_stock_item_copy(). Also frees the fields inside the stock item,
* if they are not %NULL.
- *
+ *
+ * Deprecated: 3.10
**/
void
gtk_stock_item_free (GtkStockItem *item)
* ]|
*
* Since: 2.8
+ *
+ * Deprecated: 3.10
*/
void
gtk_stock_set_translate_func (const gchar *domain,
* and #GtkActionGroup.
*
* Returns: the translated message
+ *
+ * Deprecated: 3.10
*/
typedef gchar * (*GtkTranslateFunc) (const gchar *path,
gpointer func_data);
gchar *translation_domain;
};
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_10
void gtk_stock_add (const GtkStockItem *items,
guint n_items);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_10
void gtk_stock_add_static (const GtkStockItem *items,
guint n_items);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_10
gboolean gtk_stock_lookup (const gchar *stock_id,
GtkStockItem *item);
/* Should free the list (and free each string in it also).
* This function is only useful for GUI builders and such.
*/
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_10
GSList* gtk_stock_list_ids (void);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_10
GtkStockItem *gtk_stock_item_copy (const GtkStockItem *item);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_10
void gtk_stock_item_free (GtkStockItem *item);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_10
void gtk_stock_set_translate_func (const gchar *domain,
GtkTranslateFunc func,
gpointer data,
label_text = gtk_tool_button_get_label (tool_button);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
stock_id = gtk_tool_button_get_stock_id (tool_button);
- G_GNUC_END_IGNORE_DEPRECATIONS;
if (GTK_IS_LABEL (label_widget))
{
{
label = "";
}
-
+
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
if (use_mnemonic)
menu_item = gtk_check_menu_item_new_with_mnemonic (label);
else
gboolean elide;
gchar *label_text;
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (button->priv->label_text)
{
label_text = button->priv->label_text;
elide = FALSE;
}
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
if (elide)
label_text = _gtk_toolbar_elide_underscores (label_text);
else
if (_gtk_tool_item_create_menu_proxy (item))
return TRUE;
-
+
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
if (GTK_IS_LABEL (button->priv->label_widget))
{
label = gtk_label_get_label (GTK_LABEL (button->priv->label_widget));
{
label = "";
}
-
+
+ G_GNUC_END_IGNORE_DEPRECATIONS;
+
if (use_mnemonic)
menu_item = gtk_image_menu_item_new_with_mnemonic (label);
else